﻿using Syspetro.Deploy.Jwt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Syspetro.Deploy.Managers
{
    /// <summary>
    /// 认证管理器
    /// </summary>
    public interface IAuthorizationManager
    {
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        IUserAuth GetUser();
        /// <summary>
        /// 获取用户信息
        /// </summary>
        /// <returns></returns>
        IUserAuth GetUser<T>() where T : IUserAuth, new();
        /// <summary>
        /// 获取IP
        /// </summary>
        string IP { get; }
        /// <summary>
        /// 手机号
        /// </summary>
        string GetPhone { get; }
        /// <summary>
        /// 邮箱
        /// </summary>
        string GetEmil { get; }
        /// <summary>
        /// 获取用户 Id
        /// </summary>
        /// <returns></returns>
        Guid GetUserId { get; }
        /// <summary>
        /// 获取用户名
        /// </summary>
        /// <returns></returns>
        string GetUserName { get; }
        /// <summary>
        /// 是否是管理员
        /// </summary>
        /// <returns></returns>
        bool IsAdmin { get; }
    }
}
